#include "cdap.h"

void* CDA_malloc(size_t size)
{
    void* mem = malloc(size);
    if(mem == NULL && size > 0)
        abort();
    return mem;
}

void* CDA_calloc(size_t N, size_t sizeN)
{
    void* mem = calloc(N, sizeN);
    if(mem == NULL && N*sizeN > 0)
        abort();
    return mem;
}

void* CDA_realloc(void* ptr, size_t size)
{
    void* mem == realloc(ptr, size);
    if(mem == NULL && size > 0)
        abort();
    return mem;
}

void CDA_free(void* mem)
{
    if(mem != NULL)
        free(mem);
}